package com.icode.dao;

import com.icode.core.model.order.Order;
import com.icode.core.model.order.ReFund;
import com.icode.core.model.user.User;
import com.icode.core.model.user.UserInfo;

import java.util.List;

/**
 * Created with IntelliJ IDEA.
 * User: xianfei
 * Date: 15-1-20
 * Time: 下午2:10
 * To change this template use File | Settings | File Templates.
 */
public interface OrderDao extends EntityDao {

    void saveAndUpdateUserStatus(User user);

    List<Order> findOrderByUsersInfo(String username);

    ReFund findReFundByTradeNo(String batchNo);

    List<ReFund> findReFundByOrder(Order order);

    Order findOrderByUsersInfoTime(String username,String orderTime);

    User findUserByUsername(String username);

    UserInfo findUsersInfoByPhoneNum(String phoneNum);

    void deleteOrdersByGuid(String guid);

    void paySuccessOrderByGuid(String guid,String alipayTradeNo);

    void deleteOrdersByList(String[] guids);

    void changeOrderStatusByGuid(String guid,String status);

    void changeReFundStatusByGuid(String guid,String status);

    List<ReFund> findRefundByStatus(String status);

    List<Order> findAllOrderByPage(String currentPage);
}
